home *** CD-ROM | disk | FTP | other *** search
/ Safarir 3 / SafTV-CD3.iso / pc / Bonus / Dessins Animés / static / jeux / teletub.swf / scripts / DefineButton2_150 / BUTTONCONDACTION on(press).as
Text File  |  2001-11-21  |  2KB  |  59 lines

  1. on(press){
  2.    tellTarget("../Actions_Weapons")
  3.    {
  4.       gotoAndStop("FireWeapon");
  5.       play();
  6.    }
  7.    if(eval("/:Weapon") == "2")
  8.    {
  9.       if("0" < eval("/:Rounds"))
  10.       {
  11.          Counter = "1";
  12.          while("5" >= Counter)
  13.          {
  14.             duplicateMovieClip("../CowSplat","Blood" add eval("/:Index"),eval("/:Index") + 16384);
  15.             setProperty("../Blood" add eval("/:Index"), _rotation, random("360"));
  16.             setProperty("../Blood" add eval("/:Index"), _X, getProperty("../Cursor", _X));
  17.             setProperty("../Blood" add eval("/:Index"), _Y, getProperty("../Cursor", _Y));
  18.             tellTarget("../Blood" add eval("/:Index"))
  19.             {
  20.                gotoAndPlay(2);
  21.             }
  22.             set("/:Index",eval("/:Index") + "1");
  23.             Counter += "1";
  24.          }
  25.          duplicateMovieClip("../Score+20","Score+20" add eval("/:Index"),eval("/:Index") + 16384);
  26.          setProperty("../Score+20" add eval("/:Index"), _X, getProperty("../Cursor", _X));
  27.          setProperty("../Score+20" add eval("/:Index"), _Y, getProperty("../Cursor", _Y) - "50");
  28.          tellTarget("../Score+20" add eval("/:Index"))
  29.          {
  30.             gotoAndPlay(2);
  31.          }
  32.          set("/:Index",eval("/:Index") + "1");
  33.          set("/:Score",eval("/:Score") + "20");
  34.          tellTarget("../Sounds_Announcer")
  35.          {
  36.             gotoAndPlay(2);
  37.          }
  38.          gotoAndPlay(29);
  39.       }
  40.    }
  41.    else if(eval("/:Weapon") == "1")
  42.    {
  43.       duplicateMovieClip("../Score+20","Score+20" add eval("/:Index"),eval("/:Index") + 16384);
  44.       setProperty("../Score+20" add eval("/:Index"), _X, getProperty("../Cursor", _X));
  45.       setProperty("../Score+20" add eval("/:Index"), _Y, getProperty("../Cursor", _Y) - "150");
  46.       tellTarget("../Score+20" add eval("/:Index"))
  47.       {
  48.          gotoAndPlay(2);
  49.       }
  50.       set("/:Index",eval("/:Index") + "1");
  51.       set("/:Score",eval("/:Score") + "20");
  52.       tellTarget("../Sounds_Announcer")
  53.       {
  54.          gotoAndPlay(2);
  55.       }
  56.       gotoAndPlay(29);
  57.    }
  58. }
  59.